package top.iflyoung.cim.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author liguiyang
 * @description 聊同的路由信息，保存登录用户连接的netty服务器信息
 * @sine 1.8
 * @date 2021/9/418:18
 **/
@Data
@TableName("chat_route_info")
public class ChatRouteInfo extends Model<ChatRouteInfo> {
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;
    @TableField("UserID")
    private Long userId;
    @TableField("IP")
    private String ip;
    @TableField("ServerPort")
    private Long serverPort;
    @TableField("ChatPort")
    private Long chatPort;
    @TableField("CreateTime")
    private Date createTime;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
